package com.yonyou.struts2demo.collection;

import com.opensymphony.xwork2.ActionSupport;
import com.yonyou.struts2demo.form.User;

import java.util.Map;

/**
 * @Author wwj
 * @Date 2021/12/13
 * @Description 封装数据到 map 集合
 */
public class DataToMapAction extends ActionSupport {

    // 声明 map 集合
    private Map<String, User> map;

    public Map<String, User> getMap() {
        return map;
    }

    public void setMap(Map<String, User> map) {
        this.map = map;
    }

    @Override
    public String execute() throws Exception {

        System.out.println("map = " + map);
        return NONE;
    }
}
